import type { GetDownStatisticsListResult } from "@/api/indexTypes";
import type { MyCouponHistoryDetailsResult } from "@/api/memberCoupon/types";
import { MemberCouponPermissionsEnum } from "@/enums/memberCouponEnum";

/** 创建优惠券*/
export type CreateMemberCoupon = {
  id?: number;
  isEdit?: boolean;
  historyItem?: MyCouponHistoryDetailsResult;
  positionList?: GetDownStatisticsListResult[];
  success?: () => void;
};

/** 优惠券选择谁可以看 */
export type CouponSelectPermissions = {
  role: MemberCouponPermissionsEnum;
  positionList: GetDownStatisticsListResult[];
  success: (data: {
    role: MemberCouponPermissionsEnum;
    positionList: GetDownStatisticsListResult[];
  }) => void;
};

/** 优惠券选择职务 */
export type CouponSelectPosition = {
  selected: GetDownStatisticsListResult[];
  success: (selected: GetDownStatisticsListResult[]) => void;
};

/** 优惠券详情 */
export type MemberCouponDetails = {
  id: number;
  isShare?: boolean;
  success?: () => void;
};

/** 核销列表 */
export type CancelAfterVerificationList = {
  phone?: number;
  /** 核销码 */
  verificationCode?: string;
};

/** 优惠券 领取记录 */
export type RecordCouponCollection = {
  couponId: number;
};